import  request from '@/utils/request'

export default {

  getList(searchMap){

    return request({
        url:"/banner/list",
        method:'post',
        data:searchMap
      }
    )
  },
  findById(id){

    return request({
      url:"/banner/"+id,
      method:"get"
    })

  },
  save(pojo){
    return request({
      url:"/banner/add",
      method:'post',
      data:pojo
    })
  },
  update(id,pojo){

    if(id === null || id===''){
        return this.save(pojo);
    }
    return request({
      url:"/banner/update",
      method:'post',
      data:pojo
    })

  },
  delete(id){
    return request({
      url:"/banner/delete/"+id,
      method:"get"
    })

  }

}
